package com.avic.rong.activity.no;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.avic.rong.R;
import com.github.lzyzsd.jsbridge.BridgeHandler;
import com.github.lzyzsd.jsbridge.BridgeWebView;
import com.github.lzyzsd.jsbridge.CallBackFunction;

import butterknife.BindView;
import butterknife.ButterKnife;

public class KeFuActivity extends AppCompatActivity {

    @BindView(R.id.webview)
    BridgeWebView webview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ke_fu);
        ButterKnife.bind(this);


        webview.loadUrl("http://nm.rongrong.huazhi365.com/cservice");
        webview.registerHandler("goBack", new BridgeHandler() {
            @Override
            public void handler(String data, CallBackFunction function) {

                finish();
//                function.onCallBack("submitFromWeb exe, response data from Java");
            }
        });
    }
    public static Intent queryIntent(Context context) {
        Intent intent = new Intent(context, KeFuActivity.class);
        return intent;
    }
}
